<UserControl x:Class="ViewOnCore.Helper.WPF.ColorComb"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

  <UserControl.Resources>
    <Style x:Key="HexagonButtonStyle" TargetType="{x:Type Button}">
      <Setter Property="Stylus.IsPressAndHoldEnabled" Value="False" />
      <Setter Property="Foreground" Value="Transparent" />
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate>
            <Canvas>
              <Path Data="M 0,-1 L +0.866,-0.5 L +0.866,+0.5 L 0,+1 L -0.866,+0.5 L -0.866,-0.5 Z"
                RenderTransform="12,0,0,12,0,0" 
                Fill="{TemplateBinding Background}" 
                Stroke="{TemplateBinding Foreground}" StrokeThickness="0.2" />
            </Canvas>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
      <Setter Property="FocusVisualStyle" Value="{DynamicResource HexagonButtonFVStyle}" />
    </Style>
    <Style x:Key="HexagonButtonFVStyle" TargetType="{x:Type Control}">
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate>
            <Canvas>
              <Path Data="M 0,-1 L +0.866,-0.5 L +0.866,+0.5 L 0,+1 L -0.866,+0.5 L -0.866,-0.5 Z"
                RenderTransform="9,0,0,9,0,0" 
                Stroke="Black" StrokeThickness="0.15" StrokeDashArray="1 2" />
            </Canvas>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
  </UserControl.Resources>

  <Canvas Name="canvas1" Width="300" Height="270"/>

</UserControl>
